﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dpdw.Creation.FactoryMethod
{
    public class CheesePizza : Pizza
    {
        IPizzaIngredientFactory ingredientFactory;

        public CheesePizza(IPizzaIngredientFactory ingredientFactory)
        {
            this.ingredientFactory = ingredientFactory;
        }

        public override void Prepare()
        {
            this.dough = this.ingredientFactory.CreateDough();
            this.sauce = this.ingredientFactory.CreateSauce();
            this.cheese = this.ingredientFactory.CreateCheese();
            this.clams = this.ingredientFactory.CreateClams();
        }
    }
}
